package com.jeremyfeinstein.okhttputil;

import android.util.Log;

import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLSession;

/**
 * Created by zhatong on 2019/6/6.
 * 会商主机名校验
 */

public class HSHostnameVerifier implements HostnameVerifier {
    private static final String TAG = HSHostnameVerifier.class.getSimpleName();

    @Override
    public boolean verify(String hostname, SSLSession session) {
             return  hostname.equals(session.getPeerHost());
    }
}
